<template>
	<el-container>
		<el-aside v-loading="showGrouploading" width="200px">
			<el-container>
				<el-header>
					<el-input v-model="groupFilterText" placeholder="输入关键字进行过滤" clearable></el-input>
				</el-header>
				<el-main class="nopadding">
					<el-tree ref="group" class="menu" node-key="id" :data="group" :current-node-key="''"
							 :highlight-current="true" :expand-on-click-node="false" :filter-node-method="groupFilterNode"
							 @node-click="groupClick"></el-tree>
				</el-main>
			</el-container>
		</el-aside>
		<el-container>

			<el-header>
				<div class="left-panel">
					<el-button type="primary" icon="el-icon-plus" @click="handleAdd"> </el-button>
				</div>

				<div class="right-panel">
					<el-button  type="primary" plain icon="el-icon-share" circle />
					<el-button  type="primary" plain icon="sc-icon-file-excel" circle ></el-button>
					<el-button  type="primary" plain icon="el-icon-Delete" circle />
				</div>
			</el-header>

		<el-main class="nopadding">
			<sc-Table
				:border="true"
				:stripe="true"
				:hidePagination="false"
				:hideDo="false"
				stripe remoteSort remoteFilter
				row-key="id"
				:data="tableData"
				@edit="handleEdit"
				@delete="handleDelete"
				@show="handleShow"
				:column="tableColumns">
				<el-table-column
					type="index"
					label="序号"
					width="80"
					align="center"
				/>
			</sc-Table>
		</el-main>
			<</el-container>
	</el-container>


	<el-drawer v-model="addDialog" title="新增接口" :size="1200" append-to-body destroy-on-close>
		<add></add>
	</el-drawer>
</template>

<script>
import column from './columns.js'
import data from './data.js'
import add from './add.vue'
export default {
	name: 'api_list',
	components: {
		add,
	},
	data() {
		return {
			tableData: data,
			tableColumns: column,
			addDialog: false,

		}
	},
	watch: {},

	mounted() {},
	async created() {},
	methods: {
		handleAdd() {
			console.log('新增接口')
			this.addDialog = true
		},
		handleEdit(row ){
			console.log(row)
		},
		handleDelete(row){
			console.log(row)
		},
		handleShow(row) {

		},
		issue() {},
		close() {
			this.$refs.table.clearSelection()
			this.$refs.table.getData()
		}
	}
}
</script>
<style></style>
